//go:build wireinject
// +build wireinject

package plugin

import (
	"context"
	"database/sql"
	"log/slog"

	"gitee.com/mkwchecking/k-scaffold/config"
	"gitee.com/mkwchecking/k-scaffold/pkg/rely"
	"github.com/google/wire"
	"gorm.io/gorm"
)

func initDB(
	context.Context,
	config.DatabaseConn,
	*slog.Logger,
) (*sql.DB, func(), error) {
	panic(wire.Build(
		rely.ProviderSet,
	))
}

func initGorm(
	context.Context,
	config.Database,
	*slog.Logger,
) (*gorm.DB, func(), error) {
	panic(wire.Build(
		rely.ProviderSet,
	))
}
